home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15030 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  688 b 

  1. Path: news.cc.sunysb.edu!usenet
  2. From: dkat@psych1.psy.sunysb.edu (Donna Kat)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Help, I think with an array
  5. Date: Tue, 16 Apr 1996 22:19:19 GMT
  6. Organization: State University of New York at Stony Brook
  7. Message-ID: <4l0r2l$rb9@abel.cc.sunysb.edu>
  8. References: <4kbhcl$p4l@uwm.edu> <316be255.2788761@news.netvision.net.il>
  9. NNTP-Posting-Host: catsam.psy.sunysb.edu
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. why do you need two arrays?  You have one array with age as the index
  13. and points as the value 
  14.  
  15. if you have 7 tables
  16.  
  17. int table[NUMTABLE][YEARS] {0,1,...............};
  18.  
  19. if you start at age 34 then 
  20.  
  21. print{"TABLE 1\n%d\t%d.", age,table[0][age-34]);
  22. etc.
  23.  
  24.